﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;

namespace Managistics.Model.Mappings
{
    public class ItemTypeMap : ClassMap<ItemType>
    {

        public ItemTypeMap()
        {
            Schema(Constants._tblSchema);
            Table(Constants._tblItemType);
            LazyLoad();

            Id(x => x.Code).GeneratedBy.Assigned().Column("ITEM_TYPE_ID");
            References(x => x.Catalog).Column("CATALOG_ID");

            Map(x => x.ItemTypeName).Column("ITEM_TYPE_NAME").Not.Nullable().Length(50);
            Map(x => x.DescriptionItemType).Column("DESCRIPTION_ITEM_TYPE").Length(2048);

        }
    }
}
